'Declaration<ExtensionAttribute()> <JetBrains.Annotations.NotNullAttribute()> Public Overloads Shared Function ReadValueFunction( _ ByVal metric As SparkplugMetric, _ ByVal dataType As SparkplugDataType, _ ByVal readValueFunction As Func(Of Object) _ ) As SparkplugMetric
'UsageDim metric As SparkplugMetric Dim dataType As SparkplugDataType Dim readValueFunction As Func(Of Object) Dim value As SparkplugMetric value = SparkplugMetricExtension.ReadValueFunction(metric, dataType, readValueFunction)
[Extension()] [JetBrains.Annotations.NotNull()] public static SparkplugMetric ReadValueFunction( SparkplugMetric metric, SparkplugDataType dataType, Func<object> readValueFunction )
[Extension()] [JetBrains.Annotations.NotNull()] public: static SparkplugMetric^ ReadValueFunction( SparkplugMetric^ metric, SparkplugDataType dataType, Func<Object^>^ readValueFunction )
Parameters
- metric
- The Sparkplug metric that will perform the operation.
The value of this parameter cannot be
null(Nothingin Visual Basic). - dataType
- The Sparkplug data type of the metric.
- readValueFunction
- The read value function, i.e. the function that performs the read operation and returns the value that will be published.
The value of this parameter cannot be
null(Nothingin Visual Basic).
Return Value
This method never returns null (Nothing in Visual Basic).